//
//  GRGoodDetail.h
//  YC_GRice
//
//  Created by luojinrong11 on 2018/7/11.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import <Foundation/Foundation.h>
#define GoodsDetailEventOffset (60)

typedef NS_ENUM(NSUInteger, GoodsDetailEventType) {
    //左拉事件
    GoodsDetailEventTypePullLeft,
    //上拉事件
    GoodsDetailEventTypePullUp,
    //下拉事件
    GoodsDetailEventTypePullDown,
    //返回到顶部
    GoodsDetailEventTypeScrollToTop,
    //重置图文详情页位置
    GoodsDetailEventTypeResetDownPage,
};


@protocol GRGoodDetailModel <NSObject>
@optional
@property (nonatomic, assign, readonly) CGFloat cellHeight;
@property(nonatomic,assign,readonly)BOOL isDetailComment;
@required
@property (nonatomic, strong, readonly) NSString *cellIdentifier;
@end
@protocol GRGoodTypeModelDelgate <NSObject>
@required
@property(nonatomic,strong,readonly)NSString * scValue;
@property(nonatomic,assign,readonly)BOOL ifSelect;
@property(nonatomic,assign,readonly) BOOL isEnable;

@end

@protocol GoodsDetailCellDelegate <NSObject>

@optional
@property (nonatomic, weak) id delegate;

@required
- (void)updateWithModel:(id)model atIndexPath:(NSIndexPath *)indexPath inView:(UIView *)view;


@end

@protocol GRGoodDetailBaseViewControllerDelegate <NSObject>

- (void)reloadTableView;
- (void)reloadTableViewWithIdentifier:(NSString *)identifier;
- (void)reloadTableViewAtIndex:(NSInteger)index;

@end

@protocol GoodsDetailInfoManageDelegate <NSObject>
- (NSDictionary *)infoDataForGoods;
//设置当前pageViewController是否能滑动
- (void)setPageEnable:(BOOL)enable;
//设置当前pageViewController显示的页面
- (void)setShowingPageWithIndex:(NSInteger)pageIndex;

//设置当前pageViewController NavigationView类型
- (void)changePageViewTitleTpe;
- (void)showCommentVC;
-(NSInteger)getCurreShowVC;
-(void)pushToNewVC:(UIViewController *__weak)fromVc;
@end

@protocol GoodsDetailEventDelegate <NSObject>

- (void)goodsDetailDidTriggerEnent:(GoodsDetailEventType)event;

@end

